package com.wnxy.sddfp.trade.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 借款信息表
 * </p>
 */
@Data
public class BorrowRecord implements Serializable {


    private static final long serialVersionUID = 1L;

    /**
     *  spring.shardingsphere.sharding.tables.borrow_record.table-strategy.inline.sharding-column = ID
     *  分表策略 进行标识 @TableId("ID")需要进行标识
     */
    @ApiModelProperty("主键")
    @TableId("ID")
    private Long id;

    /**
     *  spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column = USER_ID
     *  分库策略   @TableField("USER_ID") 需要进行标识
     */
    @ApiModelProperty("用户ID")
    @TableField("USER_ID")    //表 的字段识别标识
    private Long userId;

    @ApiModelProperty("用户编码")
    @TableField("USER_CODE")
    private String userCode;

    //BO_ 前缀 后面唯一就可以
    @ApiModelProperty("借款编号")
    @TableField("BORROW_RECORD_NO")
    private String borrowRecordNo;

    @ApiModelProperty("名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty("描述")
    @TableField("DESCRIPTION")
    private String description;

    @ApiModelProperty("类型")
    @TableField("TYPE")
    private String type;

    @ApiModelProperty("借款期限(天)")
    @TableField("PERIOD")
    private Integer period;

    @ApiModelProperty("投资年化利率")
    @TableField("INVEST_RATE")
    private BigDecimal investRate;

    @ApiModelProperty("借款年化利率")
    @TableField("BORROWER_RATE")
    private BigDecimal borrowerRate;

    @ApiModelProperty("平台佣金年化利率")
    @TableField("COMMISSION_RATE")
    private BigDecimal commissionRate;

    // "DEBX", "等额本息" /"DEBJ", "等额本金"  /"ALL", 一次性还款（含本息）  / "XXHB", "先息后本"
    @ApiModelProperty("还款方式")
    @TableField("REPAYMENT_WAY")
    private String repaymentWay;  

    @ApiModelProperty("借款金额")
    @TableField("AMOUNT")
    private BigDecimal amount;

    @ApiModelProperty("借款状态")
    @TableField("BORROW_STATUS")
    private String borrowStatus;

    @ApiModelProperty("创建时间")
    @TableField("CREATE_DATE")
    private Date createDate;

    @ApiModelProperty("修改时间")
    @TableField("MODIFY_DATE")
    private Date modifyDate;

    @ApiModelProperty("可用状态")
    @TableField("STATUS")
    private Boolean status;

    @ApiModelProperty("请求流水号")
    @TableField("REQ_CODE")
    private String reqCode;

}